Optimal. Leaf size=118 \[ \frac {3 a \csc (c+d x)}{d}-\frac {a \csc ^2(c+d x)}{2 d}-\frac {a \csc ^3(c+d x)}{3 d}-\frac {3 a \log (\sin (c+d x))}{d}+\frac {3 a \sin (c+d x)}{d}+\frac {3 a \sin ^2(c+d x)}{2 d}-\frac {a \sin ^3(c+d x)}{3 d}-\frac {a \sin ^4(c+d x)}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.06, antiderivative size = 118, normalized size of antiderivative = 1.00, number of steps
used = 4, number of rules used = 3, integrand size = 27, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.111, Rules used = {2915, 12, 90}
\begin {gather*} -\frac {a \sin ^4(c+d x)}{4 d}-\frac {a \sin ^3(c+d x)}{3 d}+\frac {3 a \sin ^2(c+d x)}{2 d}+\frac {3 a \sin (c+d x)}{d}-\frac {a \csc ^3(c+d x)}{3 d}-\frac {a \csc ^2(c+d x)}{2 d}+\frac {3 a \csc (c+d x)}{d}-\frac {3 a \log (\sin (c+d x))}{d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 12
Rule 90
Rule 2915
Rubi steps
\begin {align*} \int \cos ^3(c+d x) \cot ^4(c+d x) (a+a \sin (c+d x)) \, dx &=\frac {\text {Subst}\left (\int \frac {a^4 (a-x)^3 (a+x)^4}{x^4} \, dx,x,a \sin (c+d x)\right )}{a^7 d}\\ &=\frac {\text {Subst}\left (\int \frac {(a-x)^3 (a+x)^4}{x^4} \, dx,x,a \sin (c+d x)\right )}{a^3 d}\\ &=\frac {\text {Subst}\left (\int \left (3 a^3+\frac {a^7}{x^4}+\frac {a^6}{x^3}-\frac {3 a^5}{x^2}-\frac {3 a^4}{x}+3 a^2 x-a x^2-x^3\right ) \, dx,x,a \sin (c+d x)\right )}{a^3 d}\\ &=\frac {3 a \csc (c+d x)}{d}-\frac {a \csc ^2(c+d x)}{2 d}-\frac {a \csc ^3(c+d x)}{3 d}-\frac {3 a \log (\sin (c+d x))}{d}+\frac {3 a \sin (c+d x)}{d}+\frac {3 a \sin ^2(c+d x)}{2 d}-\frac {a \sin ^3(c+d x)}{3 d}-\frac {a \sin ^4(c+d x)}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.15, size = 103, normalized size = 0.87 \begin {gather*} \frac {3 a \csc (c+d x)}{d}-\frac {a \csc ^3(c+d x)}{3 d}+\frac {3 a \sin (c+d x)}{d}-\frac {a \sin ^3(c+d x)}{3 d}-\frac {a \left (2 \csc ^2(c+d x)+12 \log (\sin (c+d x))-6 \sin ^2(c+d x)+\sin ^4(c+d x)\right )}{4 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A]
time = 0.16, size = 143, normalized size = 1.21
method | result | size |
derivativedivides | \(\frac {a \left (-\frac {\cos ^{8}\left (d x +c \right )}{3 \sin \left (d x +c \right )^{3}}+\frac {5 \left (\cos ^{8}\left (d x +c \right )\right )}{3 \sin \left (d x +c \right )}+\frac {5 \left (\frac {16}{5}+\cos ^{6}\left (d x +c \right )+\frac {6 \left (\cos ^{4}\left (d x +c \right )\right )}{5}+\frac {8 \left (\cos ^{2}\left (d x +c \right )\right )}{5}\right ) \sin \left (d x +c \right )}{3}\right )+a \left (-\frac {\cos ^{8}\left (d x +c \right )}{2 \sin \left (d x +c \right )^{2}}-\frac {\left (\cos ^{6}\left (d x +c \right )\right )}{2}-\frac {3 \left (\cos ^{4}\left (d x +c \right )\right )}{4}-\frac {3 \left (\cos ^{2}\left (d x +c \right )\right )}{2}-3 \ln \left (\sin \left (d x +c \right )\right )\right )}{d}\) | \(143\) |
default | \(\frac {a \left (-\frac {\cos ^{8}\left (d x +c \right )}{3 \sin \left (d x +c \right )^{3}}+\frac {5 \left (\cos ^{8}\left (d x +c \right )\right )}{3 \sin \left (d x +c \right )}+\frac {5 \left (\frac {16}{5}+\cos ^{6}\left (d x +c \right )+\frac {6 \left (\cos ^{4}\left (d x +c \right )\right )}{5}+\frac {8 \left (\cos ^{2}\left (d x +c \right )\right )}{5}\right ) \sin \left (d x +c \right )}{3}\right )+a \left (-\frac {\cos ^{8}\left (d x +c \right )}{2 \sin \left (d x +c \right )^{2}}-\frac {\left (\cos ^{6}\left (d x +c \right )\right )}{2}-\frac {3 \left (\cos ^{4}\left (d x +c \right )\right )}{4}-\frac {3 \left (\cos ^{2}\left (d x +c \right )\right )}{2}-3 \ln \left (\sin \left (d x +c \right )\right )\right )}{d}\) | \(143\) |
risch | \(3 i a x -\frac {a \,{\mathrm e}^{4 i \left (d x +c \right )}}{64 d}-\frac {i a \,{\mathrm e}^{3 i \left (d x +c \right )}}{24 d}-\frac {5 a \,{\mathrm e}^{2 i \left (d x +c \right )}}{16 d}-\frac {11 i a \,{\mathrm e}^{i \left (d x +c \right )}}{8 d}+\frac {11 i a \,{\mathrm e}^{-i \left (d x +c \right )}}{8 d}-\frac {5 a \,{\mathrm e}^{-2 i \left (d x +c \right )}}{16 d}+\frac {i a \,{\mathrm e}^{-3 i \left (d x +c \right )}}{24 d}-\frac {a \,{\mathrm e}^{-4 i \left (d x +c \right )}}{64 d}+\frac {6 i a c}{d}+\frac {2 i a \left (9 \,{\mathrm e}^{5 i \left (d x +c \right )}-14 \,{\mathrm e}^{3 i \left (d x +c \right )}-3 i {\mathrm e}^{4 i \left (d x +c \right )}+9 \,{\mathrm e}^{i \left (d x +c \right )}+3 i {\mathrm e}^{2 i \left (d x +c \right )}\right )}{3 d \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )^{3}}-\frac {3 a \ln \left ({\mathrm e}^{2 i \left (d x +c \right )}-1\right )}{d}\) | \(235\) |
norman | \(\frac {-\frac {a}{24 d}-\frac {a \tan \left (\frac {d x}{2}+\frac {c}{2}\right )}{8 d}+\frac {29 a \left (\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}+\frac {101 a \left (\tan ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}+\frac {231 a \left (\tan ^{6}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}+\frac {231 a \left (\tan ^{8}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}+\frac {101 a \left (\tan ^{10}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}+\frac {29 a \left (\tan ^{12}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}-\frac {a \left (\tan ^{13}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}-\frac {a \left (\tan ^{14}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{24 d}+\frac {10 a \left (\tan ^{7}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {57 a \left (\tan ^{5}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}+\frac {57 a \left (\tan ^{9}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{8 d}}{\left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )^{4} \tan \left (\frac {d x}{2}+\frac {c}{2}\right )^{3}}-\frac {3 a \ln \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}+\frac {3 a \ln \left (1+\tan ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{d}\) | \(274\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 92, normalized size = 0.78 \begin {gather*} -\frac {3 \, a \sin \left (d x + c\right )^{4} + 4 \, a \sin \left (d x + c\right )^{3} - 18 \, a \sin \left (d x + c\right )^{2} + 36 \, a \log \left (\sin \left (d x + c\right )\right ) - 36 \, a \sin \left (d x + c\right ) - \frac {2 \, {\left (18 \, a \sin \left (d x + c\right )^{2} - 3 \, a \sin \left (d x + c\right ) - 2 \, a\right )}}{\sin \left (d x + c\right )^{3}}}{12 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.41, size = 139, normalized size = 1.18 \begin {gather*} -\frac {32 \, a \cos \left (d x + c\right )^{6} + 192 \, a \cos \left (d x + c\right )^{4} - 768 \, a \cos \left (d x + c\right )^{2} + 288 \, {\left (a \cos \left (d x + c\right )^{2} - a\right )} \log \left (\frac {1}{2} \, \sin \left (d x + c\right )\right ) \sin \left (d x + c\right ) + 3 \, {\left (8 \, a \cos \left (d x + c\right )^{6} + 24 \, a \cos \left (d x + c\right )^{4} - 51 \, a \cos \left (d x + c\right )^{2} + 3 \, a\right )} \sin \left (d x + c\right ) + 512 \, a}{96 \, {\left (d \cos \left (d x + c\right )^{2} - d\right )} \sin \left (d x + c\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.48, size = 104, normalized size = 0.88 \begin {gather*} -\frac {3 \, a \sin \left (d x + c\right )^{4} + 4 \, a \sin \left (d x + c\right )^{3} - 18 \, a \sin \left (d x + c\right )^{2} + 36 \, a \log \left ({\left | \sin \left (d x + c\right ) \right |}\right ) - 36 \, a \sin \left (d x + c\right ) - \frac {2 \, {\left (33 \, a \sin \left (d x + c\right )^{3} + 18 \, a \sin \left (d x + c\right )^{2} - 3 \, a \sin \left (d x + c\right ) - 2 \, a\right )}}{\sin \left (d x + c\right )^{3}}}{12 \, d} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 9.07, size = 300, normalized size = 2.54 \begin {gather*} \frac {11\,a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}{8\,d}+\frac {3\,a\,\ln \left ({\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2+1\right )}{d}-\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{8\,d}-\frac {a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3}{24\,d}-\frac {3\,a\,\ln \left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )\right )}{d}+\frac {59\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{10}+47\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+\frac {499\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^8}{3}+60\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+\frac {562\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^6}{3}+42\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+90\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^4-4\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3+\frac {29\,a\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^2}{3}-a\,\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )-\frac {a}{3}}{d\,\left (8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^{11}+32\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^9+48\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^7+32\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^5+8\,{\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )}^3\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________